package com.github.baichuan.web.reactive;

import com.github.baichuan.web.dto.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.ResponseEntity;
import reactor.core.publisher.Mono;

@Slf4j
public class Restful {

    public static Mono<ResponseEntity<Result>> created(Mono<Result> result){
        return result.map(r -> com.github.baichuan.web.servlet.Restful.created(r));
    }


    public static Mono<ResponseEntity<Result>> deleted(Mono<Result> result){
        return result.map(r -> com.github.baichuan.web.servlet.Restful.deleted(r));
    }


    public static Mono<ResponseEntity<Result>> response(Mono<Result> result){
        return result.map(r -> com.github.baichuan.web.servlet.Restful.response(r));
    }
}
